<?php if (!defined('THINK_PATH')) exit();?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<base href="http://<?php echo ($_SERVER['HTTP_HOST']); ?>__TMPL__Public/" />
<script type="text/javascript" src="/JS/WdatePicker/WdatePicker.js"></script>
<title>
<?php if(($_GET['act']) == "edit"): ?>编辑宝宝信息
<?php else: ?>
添加新宝宝<?php endif; ?>
</title>
<link href="css/base.css" rel="stylesheet" type="text/css" />
<link href="css/main.css" rel="stylesheet" type="text/css" />
<link href="css/auntion.css" rel="stylesheet" type="text/css" />
<script src="js/jquery.js" language="JavaScript" type="text/javascript"></script>
<script language="javascript">
var userpanel="baby";
</script>
</head>

<body>
<div class="wrap">
  <div class="header">
  	<div class="header_content">
      <h1 class="logo"><a href="/" title="海马爸爸">海马爸爸</a></h1>
      <div class="topbar">
      	<?php echo W("UserBar");?> | <a href="/Member/index">我的账户</a> | <a href="#">帮助中心</a> | &nbsp;客服热线：400-800-888<br/>
      	<div class="dingyue">
   		  <form><input type="text" name="email"  value="输入邮箱订阅每日最新信息..." onfocus="if(this.value=='输入邮箱订阅每日最新信息...'){this.value='';}" onblur="if(this.value==''){this.value='输入邮箱订阅每日最新信息...';}"><input type="submit" class="sub_btn"></form>
      	</div>
      </div>
	  <div class="nav">
         <ul>
            <li><a href="/" class="current">首页</a></li>
            <li><a href="#">流程介绍</a></li>
            <li><a href="#">套餐介绍</a></li>
            <li><a href="#">样板衣盒</a></li>
            <li><a href="#">赠与亲友</a></li>
            <li><a href="#">邀请亲友</a></li>
        </ul>
      </div>
    </div>
  </div>
  <div class="main">
    <div class="position"><a href="/">首页</a> &gt; <a href="/Member/baby">宝宝档案</a></div>
    <div class="user">
    	<div class="userpanel">
        	<h2>用户中心</h2>
        	<ul>
            	<li><a href="/Member/index" rel="index">账户管理</a></li>
                <?php $first_id=getFirstBabyId(); ?>
                <?php if(($first_id) != "0"): ?><li><a href="/Member/baby/act/edit/Id/<?php echo ($first_id); ?>" rel="baby">宝宝档案</a></li>
                <?php else: ?>
                <li><a href="/Member/baby" rel="baby">宝宝档案</a></li><?php endif; ?>
                <li><a href="/Member/yueli" rel="yueli">月历本</a></li>
            	<li><a href="/Member/yaoqing" rel="yaoqing">邀请亲友</a></li>
            </ul>
        </div>
<script language="javascript">
$(".userpanel").find("a[rel='"+userpanel+"']").addClass("current");
</script>
      <div class="userbox">
        	<div class="user_tab">
            	<ul>
                	<?php $_result=BabyList();if(is_array($_result)): $i = 0; $__LIST__ = $_result;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$row): $mod = ($i % 2 );++$i;?><li rel='<?php echo ($row["Id"]); ?>'><a href="/Member/baby/Id/<?php echo ($row["Id"]); ?>/act/edit"><?php echo ($row["name"]); ?></a></li><?php endforeach; endif; else: echo "" ;endif; ?>
                    <li rel=''><a href="/Member/baby/action/add">添加+</a></li>
                    <!--
                    
                	<li class="current"><a href="#">张大宝</a></li>
            		<li><a href="#">李四</a></li>
                    -->
                </ul>
                <script language="javascript">
				$(".user_tab>ul>li[rel='<?php echo ($data["Id"]); ?>']").addClass("current");
				</script>
            </div>
            <div class="user_area">
            	<div class="baby">
               	    <div class="update_box">
                    <?php if((comparedate($data["updatetime"])) > "0"): ?>您已经有7天没有更新资料，我们已经为您的宝宝大概估算出了目前的身高：<b>47cm</b> 体重：<b>32kg</b>
                    <?php else: ?>
                    	恭喜，您的资料是最新的拉！<?php endif; ?>
                    </div>
                    <form action="__ACTION__" method="post" enctype="multipart/form-data">
                    <input name="Id" type="hidden" value="<?php echo ($data["Id"]); ?>" />
                    <input name="act" type="hidden" value="<?php echo ($_GET['act']); ?>" />
                    <div class="babyform">
                        <ul>
                        <li><button type="submit" class="btn btn-success" style="float:right">资料更新</button> 姓 名（小名）：<span><input name="name" type="text" value="<?php echo ($data["name"]); ?>" /></span></li>
                        <li>性 别：
                          <select name="xingbie" id="xingbie">
                            <option value="男">男</option>
                            <option value="女">女</option>
                          </select>
                          <script language="javascript">
						  $("#xingbie").val("<?php echo ($data["xingbie"]); ?>");
						  </script>
                        </li>
                        <li>生 日：<span><input name="birthday" type="text" id="birthday" value="<?php echo ($data["birthday"]); ?>" onfocus="WdatePicker({dateFmt:'yyyy-MM-dd'})" /></span></li>
                        <li>身 高：<span><input name="shengao" type="text" id="shengao" style="width:60px" value="<?php echo ($data["shengao"]); ?>" /> 厘米 (建议更新)</span></li>
                        <li>体 重：<span><input name="tizhong" type="text" id="tizhong" style="width:60px" value="<?php echo ($data["tizhong"]); ?>" /> 公斤 (建议填写)</span></li>
                        <li style="margin-bottom:8px">体 型：
                        <select name="tixing" id="tixing">
                          <option value="偏瘦">偏瘦</option>
                          <option value="适中">适中</option>
                          <option value="偏胖">偏胖</option>
                        </select>
                          <script language="javascript">
						  $("#tixing").val("<?php echo ($data["tixing"]); ?>");
						  </script>
                        </li>
                        <li><button type="submit" class="btn btn-success">确认更改</button></li>
                        <li style="text-align:right"><a href="#">查看计划</a><span>(月历本)</span></li>
                        </ul>
                    </div>
                    </form>
                    <div class="tips">
                        <ul>
                       <li>佛山市上市公司供水公司</li>
                        <li>佛山市上市公司供水公司</li>
                         <li>佛山市上市公司供水公司</li>
                        </ul>
                    </div>
               </div>
            </div>
        </div>
      <div class="clear"></div>
    </div>
  </div>
  
    <div class="footer_content">
  	<div class="biaoyu"></div>
    <a href="#">关于我们</a> | <a href="#">关于我们</a> | <a href="#">关于我们</a> | <a href="#">关于我们</a> | <a href="#">关于我们</a> | <a href="#">关于我们</a><br/>
    &copy;2012 Haimababa.cn  All Rights Reserved<a href="#"> 浙ICP备2012244321号</a>
  </div>
 <div class="footer"></div>
</div>
</body>
</html>